// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import store from '@/store'
import '@/utils/Wechat'
import 'babel-polyfill'

// 引入lib-flexible
import 'lib-flexible'

import '@/assets/stylus/reset.styl'
import '@/assets/stylus/base.styl'

import Fastclick from 'fastclick'
import BScroll from 'better-scroll'

import VueQriously from 'vue-qriously'
import { Input, Button, Form, FormItem, Collapse, CollapseItem, Loading, Message } from 'element-ui'
Vue.use(VueQriously)
Vue.use(Input)
Vue.use(Button)
Vue.use(Form)
Vue.use(FormItem)
Vue.use(Collapse)
Vue.use(CollapseItem)

Fastclick.attach(document.body)

Vue.use(Loading.directive)
Vue.prototype.$loading = Loading.service
Vue.prototype.$message = Message

Vue.config.productionTip = false

Vue.prototype.$BScroll = BScroll

/* eslint-disable no-new */
export const vm = new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})
